package com.tramy.cn.push.sender;

import com.tramy.cn.push.common.*;

public class SenderFactory {

    public static PushSender getInstance(AuthInfo info) {
        switch (info.getPlatform()) {
            case Platform.VIVO:
                return new VIVOSender((VIVOInfo) info);
            case Platform.OPPO:
                return new OPPOSender((OPPOInfo) info);
            case Platform.XIAOMI:
                return new XIAOMISender((XIAOMIInfo) info);
            case Platform.HUAWEI:
                return new HUAWEISender((HUAWEIInfo) info);
            case Platform.APPLE:
                return new APPLESender((APPLEInfo) info);
            default:
                throw new UnsupportedOperationException("unknown target platform");
        }
    }

}
